package net.studou.convert;

import net.studou.bean.tools.IConvert;

public class IntegralToLevelImgConvert implements IConvert {

	public Object convert(Object value) throws Exception {
		int integral = Integer.parseInt(value.toString());
		if (integral <= 3) {
			return "images/s_red_0.gif";
		} else if (integral <= 10) {
			return "images/s_red_1.gif";
		} else if (integral <= 40) {
			return "images/s_red_2.gif";
		} else if (integral <= 90) {
			return "images/s_red_3.gif";
		} else if (integral <= 150) {
			return "images/s_red_4.gif";
		} else if (integral <= 250) {
			return "images/s_red_5.gif";
		} else if (integral <= 500) {
			return "images/s_blue_1.gif";
		} else if (integral <= 1000) {
			return "images/s_blue_2.gif";
		} else if (integral <= 2000) {
			return "images/s_blue_3.gif";
		} else if (integral <= 5000) {
			return "images/s_blue_4.gif";
		} else if (integral <= 10000) {
			return "images/s_blue_5.gif";
		} else {
			return "images/s_blue_5.gif";
		}
	}
}
